package com.rrd.dw.mr.gzip.kafka;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ucredit.babel.common.model.BaseModel;
import com.ucredit.babel.common.model.RecordType;
import com.ucredit.babel.common.model.tianxia.*;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper.Context;

import java.io.IOException;


/*
 * 天下信用报告记录-主表
 *
 * @author:szw
 * */

public class TxCreditMainParse extends ParseBase {
    private Text key = new Text();
    private Text val = new Text();

    /**
     * 天下信用报告记录-主表
     *
     * @param context
     * @param model
     * @param successful
     * @return boolean
     * @throws IOException
     * @throws InterruptedException
     * @author typole
     * @date 2020/11/30 5:08 下午
     */

    @Override
    public boolean parseJob(Context context, BaseModel<?> model, String successful) throws IOException, InterruptedException {
        TxCreditReportRecord obj = (TxCreditReportRecord) model;
        TxCreditReportData data = obj.getData();

        PersonIdcInfo personIdcInfo = data.getPersonIdcInfo();
        SummaryInfo summaryInfo = data.getSummaryInfo();
        CreditScoreInfo creditScoreInfo = data.getCreditScoreInfo();
        LoanBehaviorInfo loanBehaviorInfo = data.getLoanBehaviorInfo();
        CreditIndexInfo creditIndexInfo = data.getCreditIndexInfo();
        HighCreditIndexInfo highCreditIndexInfo = data.getHighCreditIndexInfo();
        RiskCaseInfo riskCaseInfo = data.getRiskCaseInfo();
        RiskJusticeInfo riskJusticeInfo = data.getRiskJusticeInfo();
        RiskPromiseInfo riskPromiseInfo = data.getRiskPromiseInfo();
        RiskTaxInfo riskTaxInfo = data.getRiskTaxInfo();
        RiskDebtInfo riskDebtInfo = data.getRiskDebtInfo();
        RiskOverdueInfo riskOverdueInfo = data.getRiskOverdueInfo();
        FinanceRiskEvaluateInfo financeRiskEvaluateInfo = data.getFinanceRiskEvaluateInfo();
        RiskScanInfo riskScanInfo = data.getRiskScanInfo();
        RiskCheckInfo riskCheckInfo = data.getRiskCheckInfo();
        FinanceBreakFailthInfo financeBreakFailthInfo = data.getFinanceBreakFailthInfo();
        TransportationBlackListInfo transportationBlackListInfo = data.getTransportationBlackListInfo();
        IncomeInfo incomeInfo = data.getIncomeInfo();
        HouseForecastInfo houseInfo = data.getHouseForecastInfo();
        String shareholderInfo = data.getShareholderInfo();
        WealthValuationInfo wealthInfo = data.getWealthValuationInfo();
        AirtktInfo airtktInfo = data.getAirtktInfo();
        RailwayInfo railwayInfo = data.getRailwayInfo();
        BigDataTagInfo bigDataTagInfo = data.getBigDataTagInfo();
        WorkingIndentityInfo workingIndentityInfo = data.getWorkingIndentityInfo();
        WorkUnitInfo workUnitInfo = data.getWorkUnitInfo();
        LegalPersonInfo legalPersonInfo = data.getLegalPersonInfo();
        TopManagerInfo topManagerInfo = data.getTopManagerInfo();
        ProfessionInfo professionInfo = data.getProfessionInfo();
        ProgressInfo progressInfo = data.getProgressInfo();
        FamilyInfo familyInfo = data.getFamilyInfo();
        RejectedBehaviorInfo rejectedBehaviorInfo = data.getRejectedBehaviorInfo();
        DriversLicenseInfo driversLicenseInfo = data.getDriversLicenseInfo();
        InvestFeatureInfo investFeatureInfo = data.getInvestFeatureInfo();
        InvestGradeInfo investGradeInfo = data.getInvestGradeInfo();
        AssetAllocationInfo assetAllocationInfo = data.getAssetAllocationInfo();
        ContactInfo contactInfo = data.getContactInfo();
        RiskScjgInfo riskScjgInfo = data.getRiskScjgInfo();
        RiskHgxxInfo riskHgxxInfo = data.getRiskHgxxInfo();
        RiskHbxxInfo riskHbxxInfo = data.getRiskHbxxInfo();
        RiskXzcfInfo riskXzcfInfo = data.getRiskXzcfInfo();
        RiskZbajInfo riskZbajInfo = data.getRiskZbajInfo();
        RiskGgsdInfo riskGgsdInfo = data.getRiskGgsdInfo();
        RiskKtggInfo riskKtggInfo = data.getRiskKtggInfo();
        RiskSplcInfo riskSplcInfo = data.getRiskSplcInfo();

        StringBuilder sb = getBaseInfo(obj, successful);
        StringBuilder TxSb = new StringBuilder(2000);

        // name 姓名
        TxSb.append(obj.getName() == null ? "" : obj.getName()).append(CRT001);
        // idcNo 身份证号
        TxSb.append(data.getIdcNo() == null ? "" : data.getIdcNo()).append(CRT001);
        // mobile 手机号
        TxSb.append(data.getMobile() == null ? "" : data.getMobile()).append(CRT001);
        // queryTime 查询时间
        TxSb.append(data.getQueryTime() == null ? "" : data.getQueryTime()).append(CRT001);
        // reportNo 报告编号
        TxSb.append(data.getReportNo() == null ? "" : data.getReportNo()).append(CRT001);
        // riskCount 存在风险项
        TxSb.append(data.getRiskCount()).append(CRT001);      // 整数，非字符串
        // normalCount 查得正常项
        TxSb.append(data.getNormalCount()).append(CRT001);    // 整数，非字符串

        if (personIdcInfo != null) {
            // personIdcInfo/code 身份信息状态
            TxSb.append(personIdcInfo.getCode() == null ? "" : personIdcInfo.getCode()).append(CRT001);
            if (personIdcInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // personIdcInfo/data/age 身份信息年龄
                TxSb.append(personIdcInfo.getData().getAge() == null ? "" : personIdcInfo.getData().getAge()).append(CRT001);
                // personIdcInfo/data/placeOfIssue 身份信息原始发证地
                TxSb.append(personIdcInfo.getData().getPlaceOfIssue() == null ? "" : personIdcInfo.getData().getAge()).append(CRT001);
            }
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (summaryInfo != null) {
            // summaryInfo/code 个人情况综述模块状态
            TxSb.append(summaryInfo.getCode() == null ? "" : summaryInfo.getCode()).append(CRT001);
        } else {
            TxSb.append(CRT001);
        }

        if (creditScoreInfo != null) {
            // creditScoreInfo/code 天下指数模块状态
            TxSb.append(creditScoreInfo.getCode() == null ? "" : creditScoreInfo.getCode()).append(CRT001);
            if (creditScoreInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // creditScoreInfo/data/score 天下指数
                TxSb.append(creditScoreInfo.getData().getScore() == null ? "" : creditScoreInfo.getData().getScore()).append(CRT001);
                // creditScoreInfo/data/grade 天下指数等级
                TxSb.append(creditScoreInfo.getData().getGrade() == null ? "" : creditScoreInfo.getData().getGrade()).append(CRT001);
                // creditScoreInfo/data/percent 天下指数百分比
                TxSb.append(creditScoreInfo.getData().getPercent() == null ? "" : creditScoreInfo.getData().getPercent()).append(CRT001);
            }
            // creditScoreInfo/analysis 天下指数模块解读
            TxSb.append(creditScoreInfo.getAnalysis() == null ? "" : creditScoreInfo.getAnalysis()).append(CRT001);
            // creditScoreInfo/notFoundMsg 天下指数未查得信息
            TxSb.append(creditScoreInfo.getNotFoundMsg() == null ? "" : creditScoreInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (loanBehaviorInfo != null) {
            // loanBehaviorInfo/code 申请行为分析模块状态
            TxSb.append(loanBehaviorInfo.getCode() == null ? "" : loanBehaviorInfo.getCode()).append(CRT001);
            if (loanBehaviorInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // loanBehaviorInfo/data/level 申请行为分析综合评级
                TxSb.append(loanBehaviorInfo.getData().getLevel() == null ? "" : loanBehaviorInfo.getData().getLevel()).append(CRT001);
                // loanBehaviorInfo/data/description 盛情行为分析行为解读
                TxSb.append(loanBehaviorInfo.getData().getDescription() == null ? "" : loanBehaviorInfo.getData().getDescription()).append(CRT001);
                if (loanBehaviorInfo.getData().getDetail() == null) {
                    TxSb.append(CRT001);
                    TxSb.append(CRT001);
                    TxSb.append(CRT001);
                    TxSb.append(CRT001);
                    TxSb.append(CRT001);
                } else {
                    // loanBehaviorInfo/data/detail/need 申请行为分析需求程度
                    TxSb.append(loanBehaviorInfo.getData().getDetail().getNeed() == null ? "" : loanBehaviorInfo.getData().getDetail().getNeed()).append(CRT001);
                    // loanBehaviorInfo/data/detail/apply 申请行为分析申请密度
                    TxSb.append(loanBehaviorInfo.getData().getDetail().getApply() == null ? "" : loanBehaviorInfo.getData().getDetail().getApply()).append(CRT001);
                    // loanBehaviorInfo/data/detail/density 申请行为分析集中程度
                    TxSb.append(loanBehaviorInfo.getData().getDetail().getDensity() == null ? "" : loanBehaviorInfo.getData().getDetail().getDensity()).append(CRT001);
                    // loanBehaviorInfo/data/detail/active 申请行为分析活跃程度
                    TxSb.append(loanBehaviorInfo.getData().getDetail().getActive() == null ? "" : loanBehaviorInfo.getData().getDetail().getActive()).append(CRT001);
                    // loanBehaviorInfo/data/detail/description 申请行为分析解释
                    TxSb.append(loanBehaviorInfo.getData().getDetail().getDescription() == null ? "" : loanBehaviorInfo.getData().getDetail().getDescription()).append(CRT001);
                }
            }
            // loanBehaviorInfo/analysis 申请行为分析模块解读
            TxSb.append(loanBehaviorInfo.getAnalysis() == null ? "" : loanBehaviorInfo.getAnalysis()).append(CRT001);
            // loanBehaviorInfo/suggest 申请行为分析模块建议
            TxSb.append(loanBehaviorInfo.getSuggest() == null ? "" : loanBehaviorInfo.getSuggest()).append(CRT001);
            // loanBehaviorInfo/notFoundMsg 申请行为分析未查得信息
            TxSb.append(loanBehaviorInfo.getNotFoundMsg() == null ? "" : loanBehaviorInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (creditIndexInfo != null) {
            // creditIndexInfo/code 消费需求度模块状态
            TxSb.append(creditIndexInfo.getCode() == null ? "" : creditIndexInfo.getCode()).append(CRT001);
            if (creditIndexInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // creditIndexInfo/data/grade 消费需求等级
                TxSb.append(creditIndexInfo.getData().getGrade() == null ? "" : creditIndexInfo.getData().getGrade()).append(CRT001);
                // creditIndexInfo/data/score 消费需求评分
                TxSb.append(creditIndexInfo.getData().getScore() == null ? "" : creditIndexInfo.getData().getScore()).append(CRT001);
            }
            // creditIndexInfo/analysis 消费需求度模块解读
            TxSb.append(creditIndexInfo.getAnalysis() == null ? "" : creditIndexInfo.getAnalysis()).append(CRT001);
            // creditIndexInfo/suggest 消费需求度模块建议
            TxSb.append(creditIndexInfo.getSuggest() == null ? "" : creditIndexInfo.getSuggest()).append(CRT001);
            // creditIndexInfo/notFoundMsg 消费需求度未查得信息
            TxSb.append(creditIndexInfo.getNotFoundMsg() == null ? "" : creditIndexInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (highCreditIndexInfo != null) {
            // highCreditIndexInfo/code 高信指数模块状态
            TxSb.append(highCreditIndexInfo.getCode() == null ? "" : highCreditIndexInfo.getCode()).append(CRT001);
            if (highCreditIndexInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // highCreditIndexInfo/data/score 高信指数评分
                TxSb.append(highCreditIndexInfo.getData().getScore() == null ? "" : highCreditIndexInfo.getData().getScore()).append(CRT001);
                // highCreditIndexInfo/data/grade 高信指数等级
                TxSb.append(highCreditIndexInfo.getData().getGrade() == null ? "" : highCreditIndexInfo.getData().getGrade()).append(CRT001);
            }
            // highCreditIndexInfo/analysis 高信指数模块解读
            TxSb.append(highCreditIndexInfo.getAnalysis() == null ? "" : highCreditIndexInfo.getAnalysis()).append(CRT001);
            // highCreditIndexInfo/suggest 高信指数模块建议
            TxSb.append(highCreditIndexInfo.getSuggest() == null ? "" : highCreditIndexInfo.getSuggest()).append(CRT001);
            // highCreditIndexInfo/notFoundMsg 高信指数未查得信息
            TxSb.append(highCreditIndexInfo.getNotFoundMsg() == null ? "" : highCreditIndexInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskCaseInfo != null) {
            // riskCaseInfo/code 裁判文书模块状态
            TxSb.append(riskCaseInfo.getCode() == null ? "" : riskCaseInfo.getCode()).append(CRT001);
            // riskCaseInfo/analysis 裁判文书模块解读
            TxSb.append(riskCaseInfo.getAnalysis() == null ? "" : riskCaseInfo.getAnalysis()).append(CRT001);
            // riskCaseInfo/suggest 裁判文书模块建议
            TxSb.append(riskCaseInfo.getSuggest() == null ? "" : riskCaseInfo.getSuggest()).append(CRT001);
            // riskCaseInfo/notFoundMsg 裁判文书未查得信息
            TxSb.append(riskCaseInfo.getNotFoundMsg() == null ? "" : riskCaseInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskJusticeInfo != null) {
            // riskJusticeInfo/code 司法执行模块状态
            TxSb.append(riskJusticeInfo.getCode() == null ? "" : riskJusticeInfo.getCode()).append(CRT001);
            // riskJusticeInfo/analysis 司法执行模块解读
            TxSb.append(riskJusticeInfo.getAnalysis() == null ? "" : riskJusticeInfo.getAnalysis()).append(CRT001);
            // riskJusticeInfo/suggest 司法执行模块建议
            TxSb.append(riskJusticeInfo.getSuggest() == null ? "" : riskJusticeInfo.getSuggest()).append(CRT001);
            // riskJusticeInfo/notFoundMsg 司法执行未查得信息
            TxSb.append(riskJusticeInfo.getNotFoundMsg() == null ? "" : riskJusticeInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskPromiseInfo != null) {
            // riskPromiseInfo/code 失信信息模块状态
            TxSb.append(riskPromiseInfo.getCode() == null ? "" : riskPromiseInfo.getCode()).append(CRT001);
            // riskPromiseInfo/analysis 失信信息模块解读
            TxSb.append(riskPromiseInfo.getAnalysis() == null ? "" : riskPromiseInfo.getAnalysis()).append(CRT001);
            // riskPromiseInfo/suggest
            TxSb.append(riskPromiseInfo.getSuggest() == null ? "" : riskPromiseInfo.getSuggest()).append(CRT001);
            // riskPromiseInfo/notFoundMsg 失信信息未查得模块
            TxSb.append(riskPromiseInfo.getNotFoundMsg() == null ? "" : riskPromiseInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskTaxInfo != null) {
            // riskTaxInfo/code 税务执法模块状态
            TxSb.append(riskTaxInfo.getCode() == null ? "" : riskTaxInfo.getCode()).append(CRT001);
            // riskTaxInfo/analysis 税务执法模块解读
            TxSb.append(riskTaxInfo.getAnalysis() == null ? "" : riskTaxInfo.getAnalysis()).append(CRT001);
            // riskTaxInfo/suggest 税务执法模块建议
            TxSb.append(riskTaxInfo.getSuggest() == null ? "" : riskTaxInfo.getSuggest()).append(CRT001);
            // riskTaxInfo/notFoundMsg 税务执法模块未查得信息
            TxSb.append(riskTaxInfo.getNotFoundMsg() == null ? "" : riskTaxInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskDebtInfo != null) {
            // riskDebtInfo/code 违约公告模块状态
            TxSb.append(riskDebtInfo.getCode() == null ? "" : riskDebtInfo.getCode()).append(CRT001);
            // riskDebtInfo/analysis 违约公告模块解读
            TxSb.append(riskDebtInfo.getAnalysis() == null ? "" : riskDebtInfo.getAnalysis()).append(CRT001);
            // riskDebtInfo/suggest 违约公告模块建议
            TxSb.append(riskDebtInfo.getSuggest() == null ? "" : riskDebtInfo.getSuggest()).append(CRT001);
            // riskDebtInfo/notFoundMsg 违约公告未查得信息
            TxSb.append(riskDebtInfo.getNotFoundMsg() == null ? "" : riskDebtInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskOverdueInfo != null) {
            // riskOverdueInfo/code 违约风险模块状态
            TxSb.append(riskOverdueInfo.getCode() == null ? "" : riskOverdueInfo.getCode()).append(CRT001);
            // riskOverdueInfo/analysis 违约风险模块解读
            TxSb.append(riskOverdueInfo.getAnalysis() == null ? "" : riskOverdueInfo.getAnalysis()).append(CRT001);
            // riskOverdueInfo/suggest
            TxSb.append(riskOverdueInfo.getSuggest() == null ? "" : riskOverdueInfo.getSuggest()).append(CRT001);
            // riskOverdueInfo/notFoundMsg
            TxSb.append(riskOverdueInfo.getNotFoundMsg() == null ? "" : riskOverdueInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (financeRiskEvaluateInfo != null) {
            // financeRiskEvaluateInfo/code 履约能力评估模块状态
            TxSb.append(financeRiskEvaluateInfo.getCode() == null ? "" : financeRiskEvaluateInfo.getCode()).append(CRT001);
            if (financeRiskEvaluateInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // financeRiskEvaluateInfo/data/abilityScore 履约能力评估指数
                TxSb.append(financeRiskEvaluateInfo.getData().getAbilityScore() == null ? "" : financeRiskEvaluateInfo.getData().getAbilityScore()).append(CRT001);
                // financeRiskEvaluateInfo/data/abilityGrade 履约能力评估等级
                TxSb.append(financeRiskEvaluateInfo.getData().getAbilityGrade() == null ? "" : financeRiskEvaluateInfo.getData().getAbilityGrade()).append(CRT001);
            }
            // financeRiskEvaluateInfo/analysis 履约能力评估模块解读
            TxSb.append(financeRiskEvaluateInfo.getAnalysis() == null ? "" : financeRiskEvaluateInfo.getAnalysis()).append(CRT001);
            // financeRiskEvaluateInfo/suggest 履约能力评估建议
            TxSb.append(financeRiskEvaluateInfo.getSuggest() == null ? "" : financeRiskEvaluateInfo.getSuggest()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskScanInfo != null) {
            // riskScanInfo/code 风险信息扫描模块状态
            TxSb.append(riskScanInfo.getCode() == null ? "" : riskScanInfo.getCode()).append(CRT001);
            // riskScanInfo/analysis 风险信息扫描模块解读
            TxSb.append(riskScanInfo.getAnalysis() == null ? "" : riskScanInfo.getAnalysis()).append(CRT001);
            // riskScanInfo/suggest 风险信息扫描模块建议
            TxSb.append(riskScanInfo.getSuggest() == null ? "" : riskScanInfo.getSuggest()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (riskCheckInfo != null) {
            // riskCheckInfo/code 社会行为风险测评模块状态
            TxSb.append(riskCheckInfo.getCode() == null ? "" : riskCheckInfo.getCode()).append(CRT001);
            if (riskCheckInfo.getData() == null) {
                TxSb.append(CRT001);
            } else {
                // riskCheckInfo/data/riskGrade 社会行为风险等级
                TxSb.append(riskCheckInfo.getData().getRiskGrade() == null ? "" : riskCheckInfo.getData().getRiskGrade()).append(CRT001);
            }
            // riskCheckInfo/analysis 社会行为风险测评模块解读
            TxSb.append(riskCheckInfo.getAnalysis() == null ? "" : riskCheckInfo.getAnalysis()).append(CRT001);
            // riskCheckInfo/suggest 社会行为风险测评模块建议
            TxSb.append(riskCheckInfo.getSuggest() == null ? "" : riskCheckInfo.getSuggest()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (financeBreakFailthInfo != null) {
            // financeBreakFailthInfo/code 严重违约失信行为模块状态
            TxSb.append(financeBreakFailthInfo.getCode() == null ? "" : financeBreakFailthInfo.getCode()).append(CRT001);
            // financeBreakFailthInfo/analysis 严重违约失信行为模块解读
            TxSb.append(financeBreakFailthInfo.getAnalysis() == null ? "" : financeBreakFailthInfo.getAnalysis()).append(CRT001);
            // financeBreakFailthInfo/suggest 严重违约失信行为模块建议
            TxSb.append(financeBreakFailthInfo.getSuggest() == null ? "" : financeBreakFailthInfo.getSuggest()).append(CRT001);
            // financeBreakFailthInfo/notFoundMsg 严重违约失信行为未查得信息
            TxSb.append(financeBreakFailthInfo.getNotFoundMsg() == null ? "" : financeBreakFailthInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (transportationBlackListInfo != null) {
            // transportationBlackListInfo/code 限制交通出行名单模块状态
            TxSb.append(transportationBlackListInfo.getCode() == null ? "" : transportationBlackListInfo.getCode()).append(CRT001);
            // transportationBlackListInfo/analysis 限制交通出行名单模块解读
            TxSb.append(transportationBlackListInfo.getAnalysis() == null ? "" : transportationBlackListInfo.getAnalysis()).append(CRT001);
            // transportationBlackListInfo/suggest 限制交通出行名单模块建议
            TxSb.append(transportationBlackListInfo.getSuggest() == null ? "" : transportationBlackListInfo.getSuggest()).append(CRT001);
            // transportationBlackListInfo/notFoundMsg 限制交通出行名单未查得信息
            TxSb.append(transportationBlackListInfo.getNotFoundMsg() == null ? "" : transportationBlackListInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (incomeInfo != null) {
            // incomeInfo/code 年收入评估模块状态
            TxSb.append(incomeInfo.getCode() == null ? "" : incomeInfo.getCode()).append(CRT001);
            if (incomeInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // incomeInfo/data/amount 金额数值
                TxSb.append(incomeInfo.getData().getAmount() == null ? "" : incomeInfo.getData().getAmount()).append(CRT001);
                // incomeInfo/data/unit 金额单位
                TxSb.append(incomeInfo.getData().getUnit() == null ? "" : incomeInfo.getData().getUnit()).append(CRT001);
                // incomeInfo/data/pert 全国排名
                TxSb.append(incomeInfo.getData().getPert() == null ? "" : incomeInfo.getData().getPert()).append(CRT001);
            }
            // incomeInfo/analysis 年收入评估模块解读
            TxSb.append(incomeInfo.getAnalysis() == null ? "" : incomeInfo.getAnalysis()).append(CRT001);
            // incomeInfo/notFoundMsg 年收入评估未查得信息
            TxSb.append(incomeInfo.getNotFoundMsg() == null ? "" : incomeInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (houseInfo != null) {
            // houseInfo/code 房产测算模块状态
            TxSb.append(houseInfo.getCode() == null ? "" : houseInfo.getCode()).append(CRT001);
            if (houseInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // houseInfo/data/status 名下是否有房
                TxSb.append(houseInfo.getData().getStatus() == null ? "" : houseInfo.getData().getStatus()).append(CRT001);
                // houseInfo/data/totalAmount 房产估值
                TxSb.append(houseInfo.getData().getAmount() == null ? "" : houseInfo.getData().getAmount()).append(CRT001);
                // houseInfo/data/unit 金额单位
                // TxSb.append(houseInfo.getData().getUnit() == null ? "" : houseInfo.getData().getUnit()).append(CRT001);
                // houseInfo/data/type 房产属性
                TxSb.append(houseInfo.getData().getType() == null ? "" : houseInfo.getData().getType()).append(CRT001);
                // houseInfo/data/avgIncreaseRate 升值空间
                TxSb.append(houseInfo.getData().getAvgIncreaseRate() == null ? "" : houseInfo.getData().getAvgIncreaseRate()).append(CRT001);
            }
            // houseInfo/analysis 年收入评估模块解读
            TxSb.append(houseInfo.getAnalysis() == null ? "" : houseInfo.getAnalysis()).append(CRT001);
            // houseInfo/notFoundMsg 年收入评估未查得信息
            TxSb.append(houseInfo.getNotFoundMsg() == null ? "" : houseInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (shareholderInfo != null) {
            JSONObject shareholderInfoJson = JSON.parseObject(shareholderInfo);
            // shareholderInfo/code 股权投资模块状态
            String code = shareholderInfoJson.getString("code");
            TxSb.append(code == null ? "": code).append(CRT001);
            // shareholderInfo/analysis 股权投资模块解析
            String analysis = shareholderInfoJson.getString("analysis");
            TxSb.append(analysis == null ? "": analysis).append(CRT001);
            // shareholderInfo/notFoundMsg 股权投资未查得信息
            String notFoundMsg = shareholderInfoJson.getString("notFoundMsg");
            TxSb.append(notFoundMsg == null ? "" : notFoundMsg).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (wealthInfo != null) {
            // wealthInfo/code 财富估值模块状态
            TxSb.append(wealthInfo.getCode() == null ? "" : wealthInfo.getCode()).append(CRT001);
            if (wealthInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // wealthInfo/data/wealth 当前财富估值
                TxSb.append(wealthInfo.getData().getWealth() == null ? "" : wealthInfo.getData().getWealth()).append(CRT001);
                // wealthInfo/data/futureWealth 财富估值单位
                TxSb.append(wealthInfo.getData().getFutureWealth() == null ? "" : wealthInfo.getData().getFutureWealth()).append(CRT001);
                // wealthInfo/data/items 未来五年财富估值
                TxSb.append(wealthInfo.getData().getItems() == null ? "" : wealthInfo.getData().getItems()).append(CRT001);
            }
            // wealthInfo/analysis 财富估值模块解读
            TxSb.append(wealthInfo.getAnalysis() == null ? "" : wealthInfo.getAnalysis()).append(CRT001);
            // wealthInfo/notFoundMsg 财富估值未查得信息
            TxSb.append(wealthInfo.getNotFoundMsg() == null ? "" : wealthInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (airtktInfo != null) {
            // airtktInfo/code 航空出行模块状态
            TxSb.append(airtktInfo.getCode() == null ? "" : airtktInfo.getCode()).append(CRT001);
            if (airtktInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // airtktInfo/data/scoreValue 航空出行指数
                TxSb.append(airtktInfo.getData().getScoreValue() == null ? "" : airtktInfo.getData().getScoreValue()).append(CRT001);
                // airtktInfo/data/frequencyDesc 航空出行频率
                TxSb.append(airtktInfo.getData().getFrequencyDesc() == null ? "" : airtktInfo.getData().getFrequencyDesc()).append(CRT001);
                // airtktInfo/data/labels 航空出行标签
                TxSb.append(airtktInfo.getData().getLabels() == null ? "" : airtktInfo.getData().getLabels()).append(CRT001);
            }
            // airtktInfo/analysis 航空出行模块解读
            TxSb.append(airtktInfo.getAnalysis() == null ? "" : airtktInfo.getAnalysis()).append(CRT001);
            // airtktInfo/notFoundMsg 航空出行未查得信息
            TxSb.append(airtktInfo.getNotFoundMsg() == null ? "" : airtktInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (railwayInfo != null) {
            // railwayInfo/code 铁路出行模块状态
            TxSb.append(railwayInfo.getCode() == null ? "" : railwayInfo.getCode()).append(CRT001);
            if (railwayInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // railwayInfo/data/scoreValue 铁路出行指数
                TxSb.append(railwayInfo.getData().getScoreValue() == null ? "" : railwayInfo.getData().getScoreValue()).append(CRT001);
                // railwayInfo/data/level 铁路出行客户等级
                TxSb.append(railwayInfo.getData().getLevel() == null ? "" : railwayInfo.getData().getLevel()).append(CRT001);
                // railwayInfo/data/frequency 铁路出行频率
                TxSb.append(railwayInfo.getData().getFrequency() == null ? "" : railwayInfo.getData().getFrequency()).append(CRT001);
                // railwayInfo/data/travelClassGrade 铁路出行等级
                // TxSb.append(railwayInfo.getData().getTravelClassGrade() == null ? "" : railwayInfo.getData().getTravelClassGrade()).append(CRT001);
                // railwayInfo/data/travelWay 铁路出行方式
                // TxSb.append(railwayInfo.getData().getTravelWay() == null ? "" : railwayInfo.getData().getTravelWay()).append(CRT001);
                // railwayInfo/data/workdayTripPercent 铁路出行工作日出行占比
                TxSb.append(railwayInfo.getData().getWorkdayTripPercent() == null ? "" : railwayInfo.getData().getWorkdayTripPercent()).append(CRT001);
            }
            // railwayInfo_suggest 铁路出行模块建议
            TxSb.append(railwayInfo.getSuggest() == null ? "" : railwayInfo.getSuggest()).append(CRT001);
            // railwayInfo_notFoundMsg 铁路出行未查得信息
            TxSb.append(railwayInfo.getNotFoundMsg() == null ? "" : railwayInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (bigDataTagInfo != null) {
            // bigDataTagInfo/code 综合行为标签模块状态
            TxSb.append(bigDataTagInfo.getCode() == null ? "" : bigDataTagInfo.getCode()).append(CRT001);
            if (bigDataTagInfo.getData() == null) {
                TxSb.append(CRT001);
            } else {
                // bigDataTagInfo/data/bigDataTag 大数据标签[json]
                TxSb.append(bigDataTagInfo.getData().getBigDataTag() == null ? "" : bigDataTagInfo.getData().getBigDataTag()).append(CRT001);
            }
            // bigDataTagInfo/analysis 综合行为标签模块解读
            TxSb.append(bigDataTagInfo.getAnalysis() == null ? "" : bigDataTagInfo.getAnalysis()).append(CRT001);
            // bigDataTagInfo/notFoundMsg 综合行为标签未查得信息
            TxSb.append(bigDataTagInfo.getNotFoundMsg() == null ? "" : bigDataTagInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (workingIndentityInfo != null) {
            // workingIndentityInfo/code 职业身份模块状态
            TxSb.append(workingIndentityInfo.getCode() == null ? "" : workingIndentityInfo.getCode()).append(CRT001);
            if (workingIndentityInfo.getData() == null) {
                TxSb.append(CRT001);
            } else {
                // workingIndentityInfo/data/name 职业身份名称
                TxSb.append(workingIndentityInfo.getData().getName() == null ? "" : workingIndentityInfo.getData().getName()).append(CRT001);
            }
            // workingIndentityInfo/analysis 职业身份模块解读
            TxSb.append(workingIndentityInfo.getAnalysis() == null ? "" : workingIndentityInfo.getAnalysis()).append(CRT001);
            // workingIndentityInfo/notFoundMsg 职业身份未查得信息
            TxSb.append(workingIndentityInfo.getNotFoundMsg() == null ? "" : workingIndentityInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (workUnitInfo != null) {
            // workUnitInfo/code 工作单位模块状态
            TxSb.append(workUnitInfo.getCode() == null ? "" : workUnitInfo.getCode()).append(CRT001);
            // workUnitInfo/analysis 工作单位模块解读
            TxSb.append(workUnitInfo.getAnalysis() == null ? "" : workUnitInfo.getAnalysis()).append(CRT001);
            // workUnitInfo/notFoundMsg 工作单位未查得信息
            TxSb.append(workUnitInfo.getNotFoundMsg() == null ? "" : workUnitInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (legalPersonInfo != null) {
            // legalPersonInfo/code 担任法定代表人模块状态
            TxSb.append(legalPersonInfo.getCode() == null ? "" : legalPersonInfo.getCode()).append(CRT001);
            // legalPersonInfo/analysis 担任法定代表人模块解读
            TxSb.append(legalPersonInfo.getAnalysis() == null ? "" : legalPersonInfo.getAnalysis()).append(CRT001);
            // legalPersonInfo/notFoundMsg 担任法定代表人未查得信息
            TxSb.append(legalPersonInfo.getNotFoundMsg() == null ? "" : legalPersonInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (topManagerInfo != null) {
            // topManagerInfo/code 任职高管模块状态
            TxSb.append(topManagerInfo.getCode() == null ? "" : topManagerInfo.getCode()).append(CRT001);
            // topManagerInfo/analysis 任职高管模块解读
            TxSb.append(topManagerInfo.getAnalysis() == null ? "" : topManagerInfo.getAnalysis()).append(CRT001);
            // topManagerInfo/notFoundMsg 任职高管未查得信息
            TxSb.append(topManagerInfo.getNotFoundMsg() == null ? "" : topManagerInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (professionInfo != null) {
            // professionInfo/code 专业能力分布模块状态
            TxSb.append(professionInfo.getCode() == null ? "" : professionInfo.getCode()).append(CRT001);
            // professionInfo/data 专业能力分布数据
            TxSb.append(professionInfo.getData() == null ? "" : JSON.toJSONString(professionInfo.getData())).append(CRT001);
            // professionInfo/analysis 专业能力分布模块解读
            TxSb.append(professionInfo.getAnalysis() == null ? "" : professionInfo.getAnalysis()).append(CRT001);
            // professionInfo/notFoundMsg 专业能力分布未查得信息
            TxSb.append(professionInfo.getNotFoundMsg() == null ? "" : professionInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (progressInfo != null) {
            // progressInfo/code 个人发展历程模块状态
            TxSb.append(progressInfo.getCode() == null ? "" : progressInfo.getCode()).append(CRT001);
            // progressInfo/data 个人发展历程数据
            TxSb.append(progressInfo.getData() == null ? "" : JSON.toJSONString(progressInfo.getData())).append(CRT001);
            // progressInfo/Analysis 个人发展历程模块解读
            TxSb.append(progressInfo.getAnalysis() == null ? "" : progressInfo.getAnalysis()).append(CRT001);
            // progressInfo/notFoundMsg 个人发展历程未查得信息
            TxSb.append(progressInfo.getNotFoundMsg() == null ? "" : progressInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (familyInfo != null) {
            // familyInfo/code 婚育情况模块状态
            TxSb.append(familyInfo.getCode() == null ? "" : familyInfo.getCode()).append(CRT001);
            if (familyInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // familyInfo/data/status 预估子女情况
                TxSb.append(familyInfo.getData().getStatus() == null ? "" : familyInfo.getData().getStatus()).append(CRT001);
                // familyInfo/data/phase 预计子女成长阶段
                TxSb.append(familyInfo.getData().getPhase() == null ? "" : familyInfo.getData().getPhase()).append(CRT001);
                // familyInfo/data/maritalStatus 婚姻状态
                TxSb.append(familyInfo.getData().getMaritalStatus() == null ? "" : familyInfo.getData().getMaritalStatus()).append(CRT001);
            }
            // familyInfo/analysis 婚育情况模块解读
            TxSb.append(familyInfo.getAnalysis() == null ? "" : familyInfo.getAnalysis()).append(CRT001);
            // familyInfo/notFoundMsg 婚育情况未查得信息
            TxSb.append(familyInfo.getNotFoundMsg() == null ? "" : familyInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        if (rejectedBehaviorInfo != null) {
            // rejectedBehaviorInfo/code 申请通过率模块状态
            TxSb.append(rejectedBehaviorInfo.getCode() == null ? "" : rejectedBehaviorInfo.getCode()).append(CRT001);
            if (rejectedBehaviorInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // rejectedBehaviorInfo/data/rate 申请通过率
                TxSb.append(rejectedBehaviorInfo.getData().getRate() == null ? "" : rejectedBehaviorInfo.getData().getRate()).append(CRT001);
                // rejectedBehaviorInfo/data/tags 申请被拒标签
                TxSb.append(rejectedBehaviorInfo.getData().getTags() == null ? "" : rejectedBehaviorInfo.getData().getTags()).append(CRT001);
            }
            // rejectedBehaviorInfo/analysis 申请通过率模块解读
            TxSb.append(rejectedBehaviorInfo.getAnalysis() == null ? "" : rejectedBehaviorInfo.getAnalysis()).append(CRT001);
            // rejectedBehaviorInfo/notFoundMsg 申请通过率未查得信息
            TxSb.append(rejectedBehaviorInfo.getNotFoundMsg() == null ? "" : rejectedBehaviorInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 驾驶证模块
        if (driversLicenseInfo != null) {
            // driversLicenseInfo/code 驾驶证模块状态
            TxSb.append(driversLicenseInfo.getCode() == null ? "" : driversLicenseInfo.getCode()).append(CRT001);
            if (driversLicenseInfo.getData() == null) {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            } else {
                // driversLicenseInfo/data/driversLicenseStatusDesc 驾驶证状态
                TxSb.append(driversLicenseInfo.getData().getDriversLicenseStatusDesc() == null ? "" : driversLicenseInfo.getData().getDriversLicenseStatusDesc()).append(CRT001);
                // driversLicenseStatusDesc/data/issueDate 驾龄
                TxSb.append(driversLicenseInfo.getData().getIssueDate() == null ? "" : driversLicenseInfo.getData().getIssueDate()).append(CRT001);
                // driversLicenseStatusDesc/data/quasiDrivingType 准架车型
                TxSb.append(driversLicenseInfo.getData().getQuasiDrivingType() == null ? "" : driversLicenseInfo.getData().getQuasiDrivingType()).append(CRT001);
            }
            // driversLicenseInfo/analysis 驾驶证模块解读
            TxSb.append(driversLicenseInfo.getAnalysis() == null ? "" : driversLicenseInfo.getAnalysis()).append(CRT001);
            // driversLicenseInfo/notFoundMsg 驾驶证未查得信息
            TxSb.append(driversLicenseInfo.getNotFoundMsg() == null ? "" : driversLicenseInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 投资特点
        if (investFeatureInfo != null) {
            // investFeatureInfo/code 投资特点状态
            TxSb.append(investFeatureInfo.getCode() == null ? "" : investFeatureInfo.getCode()).append(CRT001);
            if (investFeatureInfo.getData() != null) {
                TxSb.append(investFeatureInfo.getData().getInvestPrefer() == null ? "" : investFeatureInfo.getData().getInvestPrefer()).append(CRT001);
                TxSb.append(investFeatureInfo.getData().getRiskPrefer() == null ? "" : investFeatureInfo.getData().getRiskPrefer()).append(CRT001);
                TxSb.append(investFeatureInfo.getData().getTimeLimit() == null ? "" : investFeatureInfo.getData().getTimeLimit()).append(CRT001);
                TxSb.append(investFeatureInfo.getData().getConcentrationRatio() == null ? "" : investFeatureInfo.getData().getTotalYield()).append(CRT001);
                TxSb.append(investFeatureInfo.getData().getTotalYield() == null ? "" : investFeatureInfo.getData().getTotalYield()).append(CRT001);
            } else {
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
                TxSb.append(CRT001);
            }
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 投资需求度
        if (investGradeInfo != null) {
            //
            TxSb.append(investGradeInfo.getCode() == null ? "" : investGradeInfo.getCode()).append(CRT001);
            TxSb.append(investGradeInfo.getData().getGrade() == null ? "" : investGradeInfo.getData().getGrade()).append(CRT001);
            TxSb.append(investGradeInfo.getNotFoundMsg() == null ? "" : investGradeInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 资产配置
        if (assetAllocationInfo != null) {
            TxSb.append(assetAllocationInfo.getCode() == null ? "" : assetAllocationInfo.getCode()).append(CRT001);
            TxSb.append(assetAllocationInfo.getNotFoundMsg() == null ? "" : assetAllocationInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 手机行为分析
        if (contactInfo != null) {
            TxSb.append(contactInfo.getCode() == null ? "" : contactInfo.getCode()).append(CRT001);
            TxSb.append(contactInfo.getData().getMobileStatusDesc() == null ? "" : contactInfo.getData().getMobileStatusDesc()).append(CRT001);
            TxSb.append(contactInfo.getData().getCarrierDesc() == null ? "" : contactInfo.getData().getCarrierDesc()).append(CRT001);
            TxSb.append(contactInfo.getData().getAreaInfo() == null ? "" : contactInfo.getData().getAreaInfo()).append(CRT001);
            TxSb.append(contactInfo.getData().getTimeLengthDesc() == null ? "" : contactInfo.getData().getTimeLengthDesc()).append(CRT001);
            TxSb.append(contactInfo.getData().getMemberLevel() == null ? "" : contactInfo.getData().getMemberLevel()).append(CRT001);
            TxSb.append(contactInfo.getData().getFeeLevel() == null ? "" : contactInfo.getData().getFeeLevel()).append(CRT001);
            TxSb.append(contactInfo.getNotFoundMsg() == null ? "" : contactInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 市场监督信息
        if (riskScjgInfo != null) {
            TxSb.append(riskScjgInfo.getCode() == null ? "" : riskScjgInfo.getCode()).append(CRT001);
            TxSb.append(riskScjgInfo.getNotFoundMsg() == null ? "" : riskScjgInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 海关信息
        if (riskHgxxInfo != null) {
            TxSb.append(riskHgxxInfo.getCode() == null ? "" : riskHgxxInfo.getCode()).append(CRT001);
            TxSb.append(riskHgxxInfo.getNotFoundMsg() == null ? "" : riskHgxxInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 环保信息
        if (riskHbxxInfo != null) {
            TxSb.append(riskHbxxInfo.getCode() == null ? "" : riskHbxxInfo.getCode()).append(CRT001);
            TxSb.append(riskHbxxInfo.getNotFoundMsg() == null ? "" : riskHbxxInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 其他行政
        if (riskXzcfInfo != null) {
            TxSb.append(riskXzcfInfo.getCode() == null ? "" : riskXzcfInfo.getCode()).append(CRT001);
            TxSb.append(riskXzcfInfo.getNotFoundMsg() == null ? "" : riskXzcfInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 终本案件
        if (riskZbajInfo != null) {
            TxSb.append(riskZbajInfo.getCode() == null ? "" : riskZbajInfo.getCode()).append(CRT001);
            TxSb.append(riskZbajInfo.getNotFoundMsg() == null ? "" : riskZbajInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 公告送达
        if (riskGgsdInfo != null) {
            TxSb.append(riskGgsdInfo.getCode() == null ? "" : riskGgsdInfo.getCode()).append(CRT001);
            TxSb.append(riskGgsdInfo.getNotFoundMsg() == null ? "" : riskGgsdInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 开庭公告
        if (riskKtggInfo != null) {
            TxSb.append(riskKtggInfo.getCode() == null ? "" : riskKtggInfo.getCode()).append(CRT001);
            TxSb.append(riskKtggInfo.getNotFoundMsg() == null ? "" : riskKtggInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // 审判流程
        if (riskSplcInfo != null) {
            TxSb.append(riskSplcInfo.getCode() == null ? "" : riskSplcInfo.getCode()).append(CRT001);
            TxSb.append(riskSplcInfo.getNotFoundMsg() == null ? "" : riskSplcInfo.getNotFoundMsg()).append(CRT001);
        } else {
            TxSb.append(CRT001);
            TxSb.append(CRT001);
        }

        // product 产品名称
        TxSb.append(data.getProduct() == null ? "" : data.getProduct()).append(CRT001);
        // productCode 产品类型code
        TxSb.append(data.getProductCode() == null ? "" : data.getProductCode()).append(CRT001);
        key.set(getKey());
        val.set((sb.toString() + TxSb.toString()).replace("\n", " ").replace("\r", " "));
        context.write(key, val);
        return true;
    }

    @Override
    public String getSubType() {
        return ".main";
    }

    @Override
    public String getTableName() {
        return "kafka_babel_tx_credit_main_inc";
    }

    @Override
    public String getType() {
        return RecordType.TX_CREDIT_REPORT_RECORD.toString();
    }

    @Override
    public String getComment() {
        return "天下信用-主表";
    }
}
